<template>
  <div class="hello">
	user组件
	<button @click="getdata()">vue-axios</button>
  </div>
</template>

<script>
export default {
  name: 'HelloWorld',
  data () {
    return {
      msg: 'Welcome to Your Vue.js App'
    }
  },
  methods:{
	getdata: function() {
		var api = 'http://www.phonegap100.com/appapi.php?a=getPortalList&catid=20&page=1';
		axios
			.get(api)
			.then(res => {
				console.log(res);
				this.list=res.data.result
				console.log(this.list)
			})
			.catch(err => {
				console.log(err);
			});
	},
  }
  
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

</style>
